<?php
/**
 * Created by PhpStorm.
 * User: jack Wang
 * Date: 2021/12/16
 * Time: 15:19
 */

class Prop_model extends Base_Model
{
    public function __construct()
    {
        parent::__construct();
    }

    public function myProp($uid)
    {
        $res = $this->db->select('r.id,uid,desc,image,prid,num,p.prop_name')
            ->where('uid', $uid)
            ->join('prop p', 'p.id = r.prid', 'left')
            ->get('rucksack r');
        return $res->num_rows() ? $res->result_array() : "";
    }

    public function getPropFiledsById($id, $field = "prop_name")
    {
        return $this->commonQuery($field, ['id' => $id], 'prop');
    }
}